package web;

import java.util.concurrent.LinkedBlockingQueue;

public class CrawlerRegistration
{
	private final LinkedBlockingQueue<String> data;

	public CrawlerRegistration()
	{
		data = new LinkedBlockingQueue<String>();
	}

	public void RegisterNewUrl(String url)
	{
		try
		{
			data.put(url);
		} catch (InterruptedException e)
		{
			e.printStackTrace();
		}
	}

	public String UnregisterUrl() throws InterruptedException
	{
		return data.take();
	}

	public LinkedBlockingQueue<String> getQueue()
	{
		return data;
	}
}
